Skip to content

refactor: update tests with old entities definition#10026

Merged
michalsn merged 3 commits intocodeigniter4:developfrom
michalsn:fix/entity-tests
Mar 8, 2026
Merged

refactor: update tests with old entities definition#10026
michalsn merged 3 commits intocodeigniter4:developfrom
michalsn:fix/entity-tests

Conversation

@michalsn
Copy link
Member

@michalsn michalsn commented Mar 7, 2026

Description
This PR fixes the old entities definition.

Closes #10022

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the refactor Pull requests that refactor code label Mar 7, 2026
Copy link
Contributor

@neznaika0 neznaika0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See tests/_support/Models/UserModel.php

class UserModel extends Model
{
    protected $table         = 'user';
    protected $allowedFields = [
        'name',
        'email',
        'country',
        'deleted_at',
    ];
    protected $returnType     = 'object';
    protected $useSoftDeletes = true;
    protected $dateFormat     = 'datetime';
    public $name              = '';
    public $email             = '';
    public $country           = '';
}

public properties?

@michalsn
Copy link
Member Author

michalsn commented Mar 7, 2026

public properties?

Let's see what will happen when we clear this.

@neznaika0
Copy link
Contributor

@michalsn I've been running locally already

@michalsn michalsn merged commit 61072c9 into codeigniter4:develop Mar 8, 2026
47 checks passed
@michalsn
Copy link
Member Author

michalsn commented Mar 8, 2026

Thank you for the reviews!

@michalsn michalsn deleted the fix/entity-tests branch March 8, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants